$(document).ready(function () {
    new WOW().init();    
    scrollUp();
});

function bannerPlay() {
    var banner = new Swiper('.banner .swiper-container', {
        autoplay: true,
        loop: true,
        pagination: {
            el: '.swiper-pagination',
        },
    })
}

function scrollUp(){
    $.scrollUp({
        scrollName: 'scrollUp',
        scrollDistance: 300,
        scrollFrom: 'top', 
        scrollSpeed: 300, 
        easingType: 'linear',
        animation: 'fade', 
        animationSpeed: 200,
        scrollTrigger: false, 
        scrollTarget: false, 
        scrollText: '<div id="scrollUp"><i class="fa fa-angle-up"></i></div>', 
        scrollTitle: false, 
        scrollImg: false,
        activeOverlay: false,
        zIndex: 2147483647
    });
}

function pxxmListHover() {
    $(".index .pxxm-list li a:first-child").mouseover(function () {
        $(this).find('.hover').stop().animate({
            speed: 'slow',
            opacity: 1
        });
    });
    $(".index .pxxm-list li a:first-child").mouseout(function () {
        $(this).find('.hover').stop().animate({
            speed: 'slow',
            opacity: 0
        });
    });    
}

function jpjsListHover(){
    $(".index .jpjs-list li").mouseover(function () {
        $(this).find('.hover').stop().animate({
            speed: 'slow',
            width: '100%'
        });
    });
    $(".index .jpjs-list li").mouseout(function () {
        $(this).find('.hover').stop().animate({
            speed: 'slow',
            width: '20%'
        });
    });  
}

function mfkcListHover(){
    $(".index .mfkc-list li a").mouseover(function () {
        $(this).find('.hover').stop().animate({
            speed: 'slow',
            opacity: 1
        });
    });
    $(".index .mfkc-list li a").mouseout(function () {
        $(this).find('.hover').stop().animate({
            speed: 'slow',
            opacity: 0
        });
    });  
}

function courseListHover(){
    $(".main--course .course-list .course-list__item-link").mouseover(function () {
        $(this).find('.hover').stop().animate({
            speed: 500,
            opacity: 1
        });
    });
    $(".main--course .course-list .course-list__item-link").mouseout(function () {
        $(this).find('.hover').stop().animate({
            speed: 500,
            opacity: 0
        });
    });     
}